<?php 

include_once "common/db.connection.php";


	if(!empty($_POST['name'])  && !empty($_POST['synopsis'])  && empty($_POST['remove'])):
		include_once "common/inc/class.blocks.inc.php";
		$upBlocks = new GenericBlocks($db);
		$upBlocks->createNewBlocks();
		exit;
	
	elseif(!empty($_POST['name']) && $_POST['remove'] == 'true'):
		include_once "common/inc/class.blocks.inc.php";
		$deleteBlocks = new GenericBlocks($db);
		$deleteBlocks->deleteBlocks();
		echo "DELETED";
		
	else:
		echo "Failed to upload the files";
		endif;
?>

